#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
vector<int> trs[20];
vector<int> bg[20];
vector<int> bginv[20];
const int MOD = 998244353;
const int G = 3,GINV = (MOD + 1)/3;
int jc[N];
int jc_1[N];
int qpow(int x,int p){
    int res = 1;
    while(p){
        if(p & 1){
            res = 1ll*res*x%MOD;
        }   
        x = 1ll*x*x%MOD;
        p >>= 1;
    }
    return res;
}
void init(){
    for(int lgt = 0;lgt < 20;lgt++){
        int tot = 1<<lgt;
        trs[lgt] = vector<int>(tot);
        bg[lgt] = vector<int>(tot);
        bginv[lgt] = vector<int>(tot);
        for(int j = 1;j < tot;j++){
            trs[lgt][j] = (trs[lgt][j >> 1]>>1) | (j & 1) << (lgt - 1);
        }
        bg[lgt][0] = bginv[lgt][0] = 1;
        for(int i = 1;i < tot;i++){
            bg[lgt][i] = 1ll*bg[lgt][i - 1]*GINV%MOD;
            bginv[lgt][i] =  1ll*bginv[lgt][i - 1]*GINV%MOD;
        }
    }
}
vector<int> FFT(vector<int> val,int tot,int lgt){
    vector<int> res(tot);
    for(int i = 0;i < tot;i++){
        if(trs[lgt][i] < val.size()){
            res[i] = val[trs[lgt][i]];
        }
    }
    for(int i = 1;i<=lgt;i++){
        int len = 1<<i;
        int hlen = len>>1;
        for(int j = 0;j < tot;j += len){
            for(int k = 0;k < hlen;k++){
                int va = res[j + k],vb = 1ll*res[j + k + hlen]*bg[lgt][k]%MOD;
                res[j + k] = (va + vb)%MOD;
                res[j + k + hlen] = (va + vb)%MOD;
            }
        }
    }
    return res;
}
vector<int> IFFT(vector<int> val,int tot,int lgt){
    vector<int> res(tot);
    for(int i = 0;i < tot;i++){
        if(trs[lgt][i] < val.size()){           
            res[i] = val[trs[lgt][i]];
        }
    }
    for(int i = 1;i<=lgt;i++){
        int len = 1<<i;
        int hlen = len/2;
        for(int j = 0;j < tot;j += len){
            for(int k = 0;k < hlen;k++){
                int va = res[j + k],vb = 1ll*res[j + k + hlen]*bginv[lgt][k]%MOD;
                res[j + k] = (va + vb)%MOD;
                res[j + k + hlen] = (va - vb + MOD)%MOD;
            }
        }
    }
    return res;
}
vector<vector<int>> operator*(const vector<vector<int>> &va,const vector<vector<int>> &vb){
    int hlen = va.size() + vb.size() - 1;
    int wlen = va[0].size() + vb[0].size();
    int hlgt = 32 - __builtin_clz(hlen),htot = 1<<hlgt;
    int wlgt = 32 - __builtin_clz(wlen),wtot = 1<<wlgt;
    vector<vector<int>> vaf(va.size());
    vector<vector<int>> vbf(vb.size());
    for(int i = 0;i < va.size();i++){
        vaf[i] = FFT(va[i],wtot,wlgt);
    }
    for(int i = 0;i < vb.size();i++){
        vbf[i] = FFT(vb[i],wtot,wlgt);
    }
    vector<vector<int>> resf(hlen,vector<int>(wtot));
    for(int i = 0;i < wtot;i++){
        vector<int> sa = vector<int>(va.size());
        for(int j = 0;j < va.size();j++){
            sa[j] = vaf[j][i];
        }
        sa = FFT(sa,htot,hlgt);
        vector<int> sb = vector<int>(vb.size());
        for(int j = 0;j < vb.size();j++){
            sb[j] = vbf[j][i];
        }
        sb = FFT(sb,htot,hlgt);
        for(int j = 0;j < htot;j++){
            sa[j] = 1ll*sa[j]*sb[j]%MOD;
        }
        sa = IFFT(sa,htot,hlgt);
        for(int j = 0;j < hlen;j++){
            resf[j][i] = sa[j];
        }
    }
    vector<vector<int>> res(0,vector<int>(wlen));
    res.reserve(hlen);
    for(int i = 0;i < hlen;i++){  
        vector<int> rs = IFFT(resf[i],wtot,wlgt);
        int inv = qpow(1ll*wtot*htot%MOD,MOD - 2);
        rs.resize(wlen);
        for(int &v : rs){
            v = 1ll*v*inv%MOD;
        }
        res[i] = rs;
    }
    return res;
}
vector<int> lmt(const vector<int> &val,int len){
    vector<int> res(val);
    res.resize(len);
    return res;
}
vector<int> inv(vector<int> val,int mod){
    vector<int> res(1,qpow(val[0],MOD - 2));
    while(res.size()){
        int gs = res.size()*2;
        int len = gs*2;
        int lgt = 32 - __builtin_clz(len),tot = 1<<lgt;
        vector<int> va = FFT(res,tot,lgt);
        vector<int> vb = FFT(lmt(val,gs),tot,lgt);
        for(int i = 0;i < tot;i++){
            va[i] = 1ll*va[i]*vb[i]%MOD;
        }
        res = lmt(IFFT(va,tot,lgt),gs);
        int inv = qpow(tot,MOD - 2);
        for(int i = 0;i < gs;i++){
            res[i] = res[i]*inv%MOD;
        }
    }
    return lmt(res,mod);
}
vector<int> operator*(const vector<int> &va,const vector<int> &vb){
    int len = va.size() + vb.size() - 1;
    int lgt = 32 - __builtin_clz(len);
    int tot = 1<<lgt;
    vector<int> vaf = FFT(va,tot,lgt);
    vector<int> vbf = FFT(vb,tot,lgt);
    for(int i = 0;i < tot;i++){
        vaf[i] = 1ll*vaf[i]*vbf[i]%MOD;
    }
    vaf = lmt(IFFT(vaf,tot,lgt),len);
    int inv = qpow(tot,MOD - 2);
    for(int i = 0;i < tot;i++){
        vaf[i] = 1ll*vaf[i]*inv%MOD;
    }
    return vaf;
}
vector<int> BM2D(const vector<vector<int>> &P,const vector<vector<int>> &Q,int nmod,int mmod){
    if(nmod == 1){
        return lmt(P[0]*inv(Q[0],mmod),mmod);
    }
    vector<vector<int>> QI = Q;
    for(int i = 0;i < QI.size();i += 2){
        for(int j = 0;j < QI[i].size();j++){
            QI[i][j] = (MOD - QI[i][j])%MOD;
        }
    }
    vector<vector<int>> PP  = P*QI;
    vector<vector<int>> QQ  = Q*QI;
    if(PP.size() > nmod){
        PP.resize(nmod);
    }
    if(QQ.size() > nmod){
        QQ.resize(nmod);
    }
    if(PP[0].size() > mmod){
        for(int i = 0;i < PP.size();i++){
            PP[i].resize(mmod);
        }
    }
    if(QQ[0].size() > mmod){
        for(int i = 0;i < QQ.size();i++){
            QQ[i].resize(mmod);
        }
    }
    vector<vector<int>> V(0,vector<int>(QQ[0].size()));
    for(int i = 0;i < QQ.size();i+=2){
        V.push_back(QQ[i]);
    }
    vector<vector<int>> U(0,vector<int>(PP[0].size()));
    for(int i = (nmod - 1)%2;i < PP.size();i+=2){
        U.push_back(PP[i]);
    }
    return BM2D(U,V,(nmod + 1)/2,mmod);
}
vector<int> sum(vector<int> val){
    vector<int> res(val.size() + 1);
    for(int i = 0;i < val.size();i++){
        res[i + 1] = 1ll*val[i]*jc_1[i + 1]%MOD*jc[i]%MOD;
    }
    return res;
}
vector<int> delta(vector<int> val){
    vector<int> res(val.size() - 1);
    for(int i =1;i < val.size();i++){
        res[i - 1] = val[i];
    }
    return res;
}
vector<int> operator+(vector<int> va,vector<int> vb){
    if(va.size() < vb.size()){
        swap(va,vb);
    }
    vector<int> res = va;
    for(int i = 0;i < vb.size();i++){
        res[i] = (res[i] + vb[i])%MOD;
    }
    return res;
}
vector<int> operator-(vector<int> va,vector<int> vb){
    vector<int> res = va;
    if(vb.size() > va.size()){
        res.resize(vb.size());
    }
    for(int i = 0;i < vb.size();i++){
        res[i] = (res[i] - vb[i] + MOD)%MOD;
    }
    return res;
}
vector<int> ln(vector<int> val,int mod){
    return lmt(sum(inv(val,mod)),mod);
}
vector<int> exp(vector<int> val,int mod){
    vector<int> res(1,1);
    while(res.size() < mod){
        int gs = res.size()*2;
        res = lmt(res + inv(delta(res),gs)*(lmt(val,gs)*res + ln(res,mod)*res),gs);
    }
    return res;
}
vector<int> cinv(vector<int> val,int nmod){
    vector<vector<int>> P(1,vector<int>(1));
    vector<vector<int>> Q(val.size(),vector<int>(2));
    int v = val[0];
    int vinv = qpow(v,MOD - 2);
    Q[0][0] = 1;
    for(int i = 0;i < val.size();i++){
        Q[0][i] = (MOD - 1ll*val[i]*vinv%MOD)%MOD;
    }
    P[0][0] = 1;
    vector<int> res = BM2D(P,Q,nmod,nmod);
    res.resize(nmod);
    vector<int> res1 = vector<int>(nmod);
    int vv = qpow(qpow(v,MOD - 2),nmod - 1);
    for(int k = 0;k < nmod;k++){
        res[nmod - 1 - k] = 1ll*res[k]*vv%MOD*(nmod - 1)%MOD*jc_1[k]%MOD*(k > 0?jc[k - 1]:1)%MOD;
        vv = 1ll*vv*v%MOD;
    }
    res1 = ln(res1,nmod);
    int x = (MOD - qpow(nmod - 1,MOD - 2))%MOD;
    for(int i = 0;i < nmod;i++){
        res1[i] = res1[i]*x%MOD;
    }
    res1 = exp(res1,nmod);
    res1.insert(res1.begin(),0);
    res1.resize(nmod);
    for(int i = 0;i < nmod;i++){
        res1[i] = 1ll*res1[i]*v%MOD;
    }
    return res1;
}
int main(){
    init();
    int n;
    cin>>n;
    jc[0] = 1;
    jc_1[0] = 1;
    for(int i = 1;i<=n;i++){
        jc[i] = 1ll*jc[i - 1]*i%MOD;
    }
    jc_1[n] = qpow(jc[n],MOD - 2);
    for(int i = n - 1;i >= 1;i--){
        jc_1[i] = jc_1[i + 1]*(i + 1)%MOD;
    }
    vector<int> F(n);
    for(int i = 0;i < n;i++){
        cin>>F[i];
    }
    F = cinv(F,n);
    for(int i = 0;i < n;i++){
        cout<<F[i]<<' ';
    }
    cout<<'\n';
}